package chp03.homework;

public class Home4 {

    public static void main(String[] args) {
        //月份
        int month = 5;
        //飞机舱
        int seat = 2;

        //原价
        double money = 5000;
        //折扣
        double discount = 1;

        if(month>=4 && month<=10){
            System.out.println("这是旺季");
            if(seat == 1){
                System.out.println("头等舱，九折");
                discount = 0.9;
            }else{
                System.out.println("经济舱，八折");
                discount = 0.8;
            }
        }else{
            System.out.println("这是淡季");
            if(seat == 1){
                System.out.println("头等舱，五折");
                discount = 0.5;
            }else{
                System.out.println("经济舱，四折");
                discount = 0.4;
            }
        }
        System.out.println("原价:" + money);
        //计算打折后价格
        money = money * discount;
        System.out.println("您的机票价格是:" + money);
    }
}
